package com.greateamd.timetableasy.client.widgets;

import com.google.gwt.dom.client.Document;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class MessagePopupPanel extends PopupPanel
{
	public MessagePopupPanel(final String... messages)
	{
		super(true,false);
		setAnimationEnabled(true);
		setSize("200px", "100px");
		final int width = Document.get().getClientWidth();
		final int height = Document.get().getClientHeight()+Document.get().getScrollTop();
		setPopupPosition(width-220, height-120);
		
		VerticalPanel vp = new VerticalPanel();
		for(String message : messages){
			vp.add(new ClassicLabel(message));
		}
		setWidget(vp);
	}
}
